LOCAL_PATH := $(call my-dir)
ROOT_PATH := $(PWD)
SRC_PATH := $(LOCAL_PATH)/../src
#JNI_PATH := $(LOCAL_PATH)/../swig

include $(CLEAR_VARS)

LOCAL_LDLIBS += -llog
LOCAL_MODULE := librenderer
LOCAL_CPPFLAGS += -std=c++11 -fexceptions -Wall
LOCAL_LDLIBS += -lGLESv2 \
				-lEGL \
				-llog \
				-landroid
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES

LOCAL_C_INCLUDES := $(LOCAL_PATH) \
					$(SRC_PATH) \
					$(SRC_PATH)/egl \
					$(SRC_PATH)/gl \
					$(SRC_PATH)/cam \
					$(JNI_PATH)

LOCAL_SRC_FILES := $(SRC_PATH)/FrameRenderer.cc \
				   $(SRC_PATH)/ThreadPipe.cc \
				   $(SRC_PATH)/PicFrame.cc \
				   $(SRC_PATH)/egl/EglImpl.cc \
				   $(SRC_PATH)/gl/GLRenderer.cc \
				   $(SRC_PATH)/gl/GLI420Renderer.cc \
				   $(SRC_PATH)/gl/GLCommon.cc \
				   $(SRC_PATH)/gl/vs/DefaultVertexShader.cc \
				   $(SRC_PATH)/gl/fs/I420FragShader.cc \
				   $(SRC_PATH)/cam/CameraEvaluator.cc \
				   $(SRC_PATH)/cam/AndroidVideoCapture.cc \
				   $(SRC_PATH)/cam/AndroidVideoCaptureFactory.cc \
				   ./native_renderer_jni.cc \
				   ./jni_utils.cc

LOCAL_C_INCLUDES += $(SRC_PATH)/provider

LOCAL_SRC_FILES += $(SRC_PATH)/provider/FileDataProvider.cc

include $(BUILD_SHARED_LIBRARY)